<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>4.2 执行环节及作用域</title>
    <script>
        function info() {
            let query = '?name=雨夜';
            with (location) {
                var url = href + query;
            }
            return url;
        }

        console.log(info());

        function test1() {
            for (var i = 0; i < 5; i++) {
                console.log(i);
            }
            console.log(i);
        }

        test1();
    </script>



</head>
<body>

</body>
</html>